package lrl.nsfw.user.service;

import java.io.File;
import java.io.Serializable;
import java.util.List;

import javax.servlet.ServletOutputStream;

import lrl.nsfw.user.entity.User;
import lrl.nsfw.user.entity.UserRole;

public interface UserService {

	public void save(User user);
	
	public void update(User user);
	
	public void delete(Serializable id);
	
	public User findObjectById(Serializable id);
	
	public List<User> findObjects();
	
	//导出用户列表
	public void exportExcel(List<User> userList, ServletOutputStream outputStream);
	//导入用户列表
	public void importExcel(File userExcel, String userExcelFileName);
	//校验
	public List<User> findUserByAccountAndId(String account, String id);

	public void saveUserAndRole(User user, String[] userRoleIds);

	public List<UserRole> getUserRolesByUserId(String id);

	public void updateUserAndRole(User user, String[] userRoleIds);

	//登录
	public List<User> findUserByAccountAndPass(String account, String password);
}
